*/ Appendix */

capture log close
version 11
clear all
set linesize 80
set mem 500m
set matsize 800
macro drop _all
clear all
set more off

cd *********************

log using HorowitzStamLeadersIOAppendixReplicationFinal.log, replace

use HorowitzStamLeadersIOMIDReplication.dta, clear

*/ Table 1: Summary Statistics */
tabstat milnoncombat combat rebel warwin warloss rebelwin rebelloss age cinc aut tau_lead, stats(n mean sd min max)

*/ Table 2: Regional Coverage */
*Americas*

tabulate milservice if ccode>0 & ccode<200, missing
tabulate combat if ccode>0 & ccode<200, missing
tabulate rebel if ccode>0 & ccode<200, missing

*Only Central, Latin, and South America*

tabulate milservice if ccode>20 & ccode<200, missing
tabulate combat if ccode>20 & ccode<200, missing
tabulate rebel if ccode>20 & ccode<200, missing

*Europe*

tabulate milservice if ccode>199 & ccode<400, missing
tabulate combat if ccode>199 & ccode<400, missing
tabulate rebel if ccode>199 & ccode<400, missing

*Africa*

tabulate milservice if ccode>399 & ccode<600, missing
tabulate combat if ccode>399 & ccode<600, missing
tabulate rebel if ccode>399 & ccode<600, missing

*North Africa & Middle East*

tabulate milservice if ccode>599 & ccode<700, missing
tabulate combat if ccode>599 & ccode<700, missing
tabulate rebel if ccode>599 & ccode<700, missing

*Asia*

tabulate milservice if ccode>699 & ccode<900, missing
tabulate combat if ccode>699 & ccode<900, missing
tabulate rebel if ccode>699 & ccode<900, missing

*Oceana*

tabulate milservice if ccode>899 & ccode<1000, missing
tabulate combat if ccode>899 & ccode<1000, missing
tabulate rebel if ccode>899 & ccode<1000, missing

*/ Figure 1: Simple MID Initiation Statistics */
gen nomil=0
replace nomil=1 if milservice==0
replace nomil=. if milservice==.
table milnoncombat cwinit
table combat cwinit
table nomil cwinit
table rebel cwinit
table warwin cwinit
table warloss cwinit
table rebelwin cwinit
table rebelloss cwinit
ttest cwinit, by(milnoncombat)
ttest cwinit, by(combat)
ttest cwinit, by(rebel)
ttest cwinit, by(warwin)
ttest cwinit, by(warloss)
ttest cwinit, by(rebelwin)
ttest cwinit, by(rebelloss)

tab milnoncombat cwinit, row chi2
tab combat cwinit, row chi2
tab milservice cwinit, row chi2
tab nomil cwinit, row chi2
tab rebel cwinit, row chi2
tab warwin cwinit, row chi2
tab warloss cwinit, row chi2
tab rebelwin cwinit, row chi2
tab rebelloss cwinit, row chi2

ttest cwinit if milservice==1, by(combat)

clear
*/ Table 3: Full version of Table 1 */
use HorowitzStamLeadersIOWarReplication.dta
logit initiation milnoncombat combat rebel warwin warloss rebelwin rebelloss age cinc aut tau_lead officetenure1000 fiveyearchallengelag cwpceyrs1 cwpceyrs2 cwpceyrs3, cluster(leaderid)

clear

use HorowitzStamLeadersIOMIDReplication.dta, clear

*/ Model 1  */
logit cwinit milnoncombat combat rebel warwin warloss rebelwin rebelloss age aut cinc tau_lead officetenure1000 fiveyearchallengelag cwpceyrs1 cwpceyrs2 cwpceyrs3, robust cluster(leaderid)

*/ Model 3: Polity Interaction */
logit cwinit milnoncombat combat rebel milpolity combatpolity rebelpolity milrebel combatrebel warwin warloss rebelwin rebelloss age polity21 cinc tau_lead officetenure1000 fiveyearchallengelag cwpceyrs1 cwpceyrs2 cwpceyrs3, robust cluster(leaderid)

*/ Model 4: Autocracy Interaction */
logit cwinit milnoncombat combat rebel milaut combataut rebelaut milrebel combatrebel warwin warloss rebelwin rebelloss age aut cinc tau_lead officetenure1000 fiveyearchallengelag cwpceyrs1 cwpceyrs2 cwpceyrs3, robust cluster(leaderid)

*/ Model 5: Military Interaction */
logit cwinit milnoncombat combat rebel milmil combatmil rebelmil milrebel combatrebel warwin warloss rebelwin rebelloss age cinc cgvmildict tau_lead officetenure1000 fiveyearchallengelag cwpceyrs1 cwpceyrs2 cwpceyrs3  if year>1945 & year<2000, robust cluster(leaderid)

*/ Table 4: Additional Leader, System, and Regime Control */
clear
use HorowitzStamLeadersIOMIDReplication.dta, clear

*/ Model 1 from Table 1 in paper  */
logit cwinit milnoncombat combat rebel warwin warloss rebelwin rebelloss age leveledu law engineering businesscareer creative careerpolitician militarycareer labor police teacher journalism aut cinc tau_lead  majpowb syscon numGPs total irregular officetenure1000 fiveyearchallengelag cwpceyrs1 cwpceyrs2 cwpceyrs3, robust cluster(leaderid)

*/ Model 3 from Table 1 in paper  */
logit cwinit milnoncombat combat rebel milpolity combatpolity rebelpolity milrebel combatrebel warwin warloss rebelwin rebelloss age leveledu law engineering businesscareer creative careerpolitician militarycareer labor police teacher journalism polity21 cinc tau_lead  majpowb syscon numGPs total irregular officetenure1000 fiveyearchallengelag cwpceyrs1 cwpceyrs2 cwpceyrs3, robust cluster(leaderid)

*/ Model 4 from Table 1 in paper  */
logit cwinit milnoncombat combat rebel milaut combataut rebelaut milrebel combatrebel warwin warloss rebelwin rebelloss age leveledu law engineering businesscareer creative careerpolitician militarycareer labor police teacher journalism aut cinc tau_lead  majpowb syscon numGPs total postcw irregular officetenure1000 fiveyearchallengelag cwpceyrs1 cwpceyrs2 cwpceyrs3, robust cluster(leaderid)

*/ Model 5 from Table 1 in paper */
logit cwinit milnoncombat combat rebel milmil combatmil rebelmil milrebel combatrebel warwin warloss rebelwin rebelloss age cinc cgvmildict cgvcivdict leveledu law engineering businesscareer creative careerpolitician militarycareer labor police teacher journalism tau_lead  majpowb syscon numGPs total irregular officetenure1000 fiveyearchallengelag cwpceyrs1 cwpceyrs2 cwpceyrs3 if year>1945 & year<2000, robust cluster(leaderid)

*/ Table 5: Fixed Effects */
clear
use HorowitzStamLeadersIOMIDReplication.dta, clear
duplicates drop ccode year if cwinit==0, force
duplicates drop ccode year if cwinit==1, force
duplicates tag ccode year, gen(dups20K)
drop if dups20K==1 & cwinit==0

xtset ccode year
xtlogit cwinit milnoncombat combat rebel warwin warloss rebelwin rebelloss age aut cinc tau_lead officetenure1000 fiveyearchallengelag cwpceyrs1 cwpceyrs2 cwpceyrs3, fe

*/ Table 6: Bootstrapped Standard Errors */
use HorowitzStamLeadersIOMIDReplication.dta, clear
bootstrap, cluster(ccode) idcluster(newid100) group(leaderid) rep(1000): logit cwinit milnoncombat combat rebel warwin warloss rebelwin rebelloss age aut cinc tau_lead officetenure1000 fiveyearchallengelag cwpceyrs1 cwpceyrs2 cwpceyrs3, robust

*/ Table 7: Multinomial Logit */

use HorowitzStamLeadersIOMIDReplication.dta, clear
mlogit wardv milnoncombat combat rebel warwin warloss rebelwin rebelloss age aut cinc tau_lead officetenure1000 fiveyearchallengelag cwpceyrs1 cwpceyrs2 cwpceyrs3, robust cluster(leaderid)

*/ Table 8: Rare Events */
clear
use HorowitzStamLeadersIOWarReplication.dta, clear
relogit initiation milnoncombat combat rebel warwin warloss rebelwin rebelloss age cinc aut tau_lead officetenure1000 fiveyearchallengelag cwpceyrs1 cwpceyrs2 cwpceyrs3, cluster(leaderid)

*/ Table 9: Matching */
clear
use HorowitzStamLeadersIOMIDReplication.dta, clear
drop if milservice==.

*/ Matching on system/regime variables */
imb cinc tau_lead aut fiveyearchallengelag, treatment(milservice)
cem cinc tau_lead aut fiveyearchallengelag, treatment(milservice)

logit cwinit milservice rebel warwin warloss rebelwin rebelloss age aut cinc tau_lead officetenure1000 fiveyearchallengelag cwpceyrs1 cwpceyrs2 cwpceyrs3 [iweight=cem_weights], robust cluster(leaderid)

*/ Model 2: Matching on leader variables */
imb age leveledu law engineering businesscareer creative careerpolitician militarycareer labor police teacher journalism , treatment(milservice)
cem age leveledu law engineering businesscareer creative careerpolitician militarycareer labor police teacher journalism , treatment(milservice)
logit cwinit milservice rebel warwin warloss rebelwin rebelloss age aut cinc tau_lead officetenure1000 fiveyearchallengelag cwpceyrs1 cwpceyrs2 cwpceyrs3 [iweight=cem_weights], robust cluster(leaderid)

*/ Table 10: Generational Effects */
clear
use HorowitzStamLeadersIOMIDReplication.dta, clear

logit cwinit milnoncombat combat rebel warwin warloss rebelwin rebelloss age aut cinc tau_lead officetenure1000 fiveyearchallengelag lastwarwin lastwarloss lastwardraw cwpceyrs1 cwpceyrs2 cwpceyrs3, robust cluster(leaderid)

*/ Table 11: Revolutionary Effects */
clear
use HorowitzStamLeadersIOMIDReplication.dta, clear

*/ Carter et al. way */
logit cwinit milnoncombat combat rebel warwin warloss rebelwin rebelloss age leveledu law engineering businesscareer creative careerpolitician militarycareer labor police teacher journalism aut cinc tau_lead fiveyearcivwar revolutionary irregular officetenure1000 fiveyearchallengelag cwpceyrs1 cwpceyrs2 cwpceyrs3 lastwarwin lastwarloss lastwardraw, robust cluster(leaderid)

*/ Colgan way */
logit cwinit milnoncombat combat rebel warwin warloss rebelwin rebelloss age leveledu law engineering businesscareer creative careerpolitician militarycareer labor police teacher journalism aut cinc tau_lead fiveyearcivwar jcradicalleader irregular officetenure1000 fiveyearchallengelag cwpceyrs1 cwpceyrs2 cwpceyrs3 lastwarwin lastwarloss lastwardraw, robust cluster(leaderid)

*/ Table 12: Instrumented Model */
clear
use HorowitzStamLeadersIOMIDReplication.dta, clear
cmp setup

*/ Military Service Instrumented */

cmp (cwinit = milservice rebel age cinc aut tau_lead majpowb syscon numGPs total postcw irregular officetenure1000 fiveyearchallengelag cwpceyrs1 cwpceyrs2 cwpceyrs3)(milservice = realconscript irregular foreign), ind($cmp_probit $cmp_probit) cluster(leaderid) robust
estimates store m1

esttab m1 using 06012014table12.rtf, replace onecell se pr2 t(3) scalars(ll) legend label collabels(none) varlabels(_cons Constant) star(* 0.10 ** 0.05 *** 0.01) order (milnoncombat combat rebel warwin warloss rebelwin rebelloss age aut cinc tau_lead officetenure1000 fiveyearchallengelag fiveyearcivwar jcradicalleader revolutionary irregular lastwarwin lastwardraw lastwarloss cwpceyrs1 cwpceyrs2 cwpceyrs3)

*/ Table 13: Low Risk Countries - Not Interacted */
clear
use HorowitzStamLeadersIOMIDReplication.dta, clear

logit cwinit milnoncombat combat rebel warwin warloss rebelwin rebelloss cinc age aut tau_lead officetenure1000 cwpceyrs1 cwpceyrs2 cwpceyrs3 if fiveyearchallengelag==0, robust cluster(leaderid)

*/ Table 14: Count DV */
clear
use HorowitzStamLeadersIOMIDReplication.dta, clear

bysort ccode year leaderid: egen mid_count = total(cwinit)
duplicates drop ccode leaderid year, force

nbreg mid_count milnoncombat combat rebel warwin warloss rebelwin rebelloss age aut cinc tau_lead officetenure1000 fiveyearchallengelag cwpceyrs1 cwpceyrs2 cwpceyrs3, robust cluster(leaderid)

poisson mid_count milnoncombat combat rebel warwin warloss rebelwin rebelloss age aut cinc tau_lead officetenure1000 fiveyearchallengelag cwpceyrs1 cwpceyrs2 cwpceyrs3, robust cluster(leaderid)

*/ Table 15: Dyadic */
clear
use HorowitzStamLeadersIOMIDDyadicReplication.dta

logit cwinit milnoncombat combat rebel warwin warloss rebelwin rebelloss milnoncombat2 combat2 rebel2 warwin2 warloss2 rebelwin2 rebelloss2 age age2 dem1 dem2 jointdem aut1 aut2 defpact armgr85 contigld bipolar sideabof satisdy officetenure1000 officetenure1000B fiveyearchallengelag fiveyearchallengelag2 irregular irregularB cwpceyrs1 cwpceyrs2 cwpceyrs3, robust cluster(dyadid)

clear

log close
